package p270jp.pxv.android.viewholder;

import android.view.ViewGroup;
import p270jp.pxv.android.view.SegmentedLayout;
import p325m0.MutabilityOwnership;
import p521th.FlexibleItemAdapterSolidItem;
import p521th.SolidItemViewHolder;

/* compiled from: NewFollowWorksSegmentSolidItem.kt */
/* renamed from: jp.pxv.android.viewholder.NewFollowWorksSegmentSolidItem */
/* loaded from: classes2.dex */
public final class NewFollowWorksSegmentSolidItem extends FlexibleItemAdapterSolidItem {
    public static final int $stable;
    private final int defaultSelectedIndex;
    private final SegmentedLayout.OnSelectSegmentListener segmentListener;

    public NewFollowWorksSegmentSolidItem(SegmentedLayout.OnSelectSegmentListener onSelectSegmentListener, int i) {
        MutabilityOwnership.m3745m(onSelectSegmentListener, "segmentListener");
        this.segmentListener = onSelectSegmentListener;
        this.defaultSelectedIndex = i;
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public int getSpanSize() {
        return 2;
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public SolidItemViewHolder onCreateViewHolder(ViewGroup viewGroup) {
        MutabilityOwnership.m3745m(viewGroup, "parent");
        NewFollowWorksSegmentViewHolder createViewHolder = NewFollowWorksSegmentViewHolder.createViewHolder(viewGroup, this.segmentListener, this.defaultSelectedIndex);
        MutabilityOwnership.m3746l(createViewHolder, "createViewHolder(parent,…er, defaultSelectedIndex)");
        return createViewHolder;
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public boolean shouldBeInserted(int i, int i2, int i3, int i4) {
        return i3 == 0;
    }
}
